home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl760
/
scnp785j.lzh
/
SPLOT.DOC
< prev
next >
Wrap
Text File
|
1992-07-27
|
43KB
|
846 lines
SPLOT USER INSTRUCTIONS
The program SPLOT (Screen PLOT) will plot two and three dimensional
data on the screen of an IBM compatible PC with CGA, EGA, VGA or
Hercules graphics. The SPLOT program creates a plot by executing a
sequence of plot commands which can be typed at the keyboard, selected
from a menu or read from a command file.
If the user types "SPLOT filename" at the DOS prompt the program SPLOT
will execute plot commands read from the text file "filename". The
plot commands specify plot parameters such as type of axes. Multiple
sets of data can be plotted on the same plot. The sets of data can be
in the command file or in separate data files. It is assumed that the
plot commands and data are stored as ASCII text by an editor, word
processor or a user written program that generates the plot commands
and/or data as output (as do the example Basic programs FUNGEN.BAS,
SURFGEN.BAS and CURVEGEN.BAS which generate data and commands to plot
user programmed functions).
If just "SPLOT" is typed at the DOS prompt then the plot commands can be
typed at the keyboard. Pressing the ESC key calls up a menu from which
the plot commands can be selected using the arrow keys or a mouse (there
are a few commands that are not accessible from the menu). The RETURN
key (or left mouse button) selects a menu item; the ESC key (or right
mouse button) exits the menu and sub-menus. The mouse must have a
Microsoft compatible driver installed that can be called with software
interrupt # 33h. If calling software interrupt # 33h on a PC with no
mouse or a nonstandard mouse causes a problem (not likely but just
in case...) then use of a mouse can be disabled with the DOS command
"SET SPLOT=NOM"; the equals-sign "=" must immediately follow "SPLOT".
The SET command must be typed before starting the SPLOT program or it
can be placed in the PC's AUTOEXEC.BAT file.
On most PCs the program will detect the type of installed graphics card
(CGA, EGA/VGA or Hercules); unless specified, EGA resolution is used
with VGA cards. The graphics card can be specified with the DOS command
"SET SPLOT=card" where "card" is "CGA", "EGA" "VGA" or "HER". Use this
command to specify VGA resolution with a VGA card or if the program
incorrectly detects the type of graphics card or if the monitor used
with an EGA or VGA card will only support CGA resolution. For example,
the AT&T 6300 Display Enhancement Board is detected as being EGA but it
is not compatible with EGA; it is compatible with CGA. To specify that
the SPLOT program use CGA mode on an AT&T with a DEB, give the DOS
command "SET SPLOT=CGA". To use VGA resolution with a VGA card give the
DOS command "SET SPLOT=VGA"; to also disable use of a mouse give the
command "SET SPLOT=VGA/NOM".
The following plot commands specify the type of axes. The x axis is
the horizontal axis and the y axis is the vertical axis; a
3-Dimensional plot will also have a z axis perpendicular to the x-y
plane. The z axis can also be used as a second vertical axis on
the right side of a 2-Dimensional plot (see USEZ command):
LINX - Selects linear x axis (the default).
LOGX - Selects log x axis.
PROBX - Selects cumulative normal probability x axis.
LINY - Selects linear y axis (the default).
LOGY - Selects log y axis.
PROBY - Selects cumulative normal probability y axis.
LINZ - Selects linear z axis (the default).
LOGZ - Selects log z axis.
By default the program will automatically set the scales of the axes
based on the minimum and maximum data values. The scales of the
axes can be set by the user with the following commands:
XSTART value - The x axis will start at "value".
XEND value - The x axis will end at "value".
XSTEP value - Linear x axis tic marks will be labeled
in steps of "value".
YSTART value - The y axis will start at "value".
YEND value - The y axis will end at "value".
YSTEP value - Linear y axis tic marks will be labeled
in steps of "value".
ZSTART value - The z axis will start at "value".
ZEND value - The z axis will end at "value".
ZSTEP value - Linear z axis tic marks will be labeled
in steps of "value".
Automatic scaling of an axis can be re-enabled by setting the starting
and ending values equal to the same value, i.e., "XSTART 0" and "XEND
0". If the step size is omitted from a linear axis then the program
will select a step size and adjust the starting and ending values to
match the step size. The step size is ignored with a log axis. A log
axis will cover a maximum of 8 decades and will always start and
end at decade boundaries. Data plotted on a normal probability axis
must be in the range .0001 to .9999; the axis will be labeled using
the scaled range .01 to 99.99.
The following commands specify other axes parameters:
XDESCEND - X axis (on 2D plots) will be labeled in descending order.
YDESCEND - Y axis (on 2D plots) will be labeled in descending order.
XDESCEND OFF - Turns off XDESCEND.
YDESCEND OFF - Turns off YDESCEND.
XGRID - Grid lines will be drawn at labeled x axis tic marks.
YGRID - Grid lines will be drawn at labeled y axis tic marks.
GRIDS - Turns on both x & y grid lines.
XGRID OFF - Turns off display of x axis grid lines.
YGRID OFF - Turns off display of y axis grid lines.
GRIDS OFF - Turns off both x & y grid lines.
XBASE value - Vertical base line will be drawn at "value" on x axis.
YBASE value - Horizontal base line will be drawn at "value" on y axis.
XBASE OFF - Turns off display of x axis base line.
YBASE OFF - Turns off display of y axis base line.
XTICS n - Selects "n" minor x axis tic marks between labeled
tic marks (default is 4).
YTICS n - Selects "n" minor y axis tic marks between labeled
tic marks (default is 4).
ZTICS n - Selects "n" minor z axis tic marks between labeled
tic marks (default is 4).
The following commands are used to read the data:
OPEN filename - Opens data file "filename" for read.
READ n - Reads "n" x y data point pairs.
If no data file is opened then the data is read from the command file
starting at the line after the READ command. Multiple READ commands will
result in multiple sets of data being plotted on the same plot. There
can be a maximum of 200 data sets and a maximum of 16000 data points
per data set; the number of data points per data set will also be limited
by the amount of available memory. If "n" is omitted then it defaults
to 1024; less than "n" data points will be read if the end of the file
is reached. Successive data values must be separated by at least one
non-numeric character other than "+", "-", ".", "E" or "e". Numbers can
be in scientific notation with "E" or "e" preceding the exponent.
Data can also be read inwhich all of the x values precede all of the y
values:
READX n - Reads "n" x data values; must precede READY command.
READY n - Reads "n" y data values; x = 1, 2, 3 ... if no READX.
If multiple READY commands are used to read multiple data sets inwhich
corresponding y values are associated with the same x value then only
one READX command is required. If a READY command is not preceded
by a READX (or READ) command then the y values will be plotted at even
intervals.
Multiple sets of data can also be read when the data is arranged in
the form of a table:
READTAB m n - Reads "n" rows of table with columns x, y1, ..., ym.
The x values must be in the first column and the
corresponding y values of data set #1 to data set #m
must be in the remaining "m" columns.
READTABY m n - Reads "n" rows of table with columns y1, ..., ym.
If the command is not preceded by a READX command
then the y values will be plotted at even intervals.
Multiple sets of data can be plotted on a 3-Dimensional plot inwhich
each data set corresponds to a point on the z axis:
READZ n - Reads "n" z data values for 3-D plots; there should
be one z value per data set.
A single 3-Dimensional curve can be plotted inwhich the points on the
curve are the x-y points in data set #1 and the corresponding z values
read with the READZ command. There can be a maximum of 1024 points on
the 3-D curve. A table of x y z data values can be read with the
following command:
READXYZ n - Reads "n" x y z values as single 3-D data set
for plotting as a 3-D curve or 3-D scatter plot.
READZXY n - Reads the 3-D data point values in the order z x y.
The following are some more commands used in reading data:
READBARX n - Reads "n" character strings to be used as the x
value labels on a bar graph.
SKIP n - Skips "n" lines of the data file.
SEARCH text - Reads from the data file until a line containing
"text" is read.
CLOSE - Closes the data file; opening a new data file will
also close a previously opened data tile.
The following commands will generate a curve fit of a data set:
POLY m n - Generates an mth degree polynomial least squares fit
of data set #n.
EXP m n - Generates an exponential of an mth degree polynomial
least squares fit of data set #n, i.e.,
m m-1
Cm X + Cm-1 X + ... + C1 X + C0
Y = e
AVG m n - Generates a nonweighted moving average smooth fit of
data set #n using a moving window 2*m+1 data points wide.
The data points must be equally spaced.
If "m" is omitted then it defaults to one; a polynomial fit's degree
cannot be greater than 10. If "n" is omitted it defaults to the last
read data set. The generated data is stored as a new data set.
The commands "POLY m n x1 y1 x2 y2" and "EXP m n x1 y1 x2 y2" force
the fitted curve to pass through point (x1,y1) and, optionally, through
point (x2,y2); the parameters "m" and "n" cannot be omitted. Example:
the command "POLY 2 1 0 0" fits a 2nd degree polynomial to data set #1
with the polynomial forced to pass through the origin.
If the POLY or EXP command is used again to fit the same data set with
a different degree polynomial or the AVG command is used again with a
different window size then the new fit will overwrite the old one.
This feature can be particularly useful when doing a polynomial curve
fit and it is not known what degree will give the best fit. When
entered interactively from the keyboard or selected from the menu, the
POLY command (and EXP command) will display a statistic, the residual
variance. First try a first degree fit with the command "POLY 1" and
note the residual variance. Then try a second degree fit with the
command "POLY 2" and again note the residual variance. Then try a third
degree fit, etc. When a degree is reached inwhich the residual variance
did not change by much from the previous value then the previous degree
is the one that should be used.
KEEP - Keeps the last generated fit from being overwritten
by a new one.
OUTPOLY file - Outputs the last generated polynomial's coefficients
to the specified file; if the file is omitted then
the output will be to the screen.
EXPWT m - Exponential fits will be weighted with the y data values
raised to the mth power; m = 0,1,2. The default is m=2.
If an exponential fit is used to fit a bell shaped curve,
for example, then a closer fit of the points at the top
of the peak will be made if y squared is used as a weight.
If the data is not weighted (m=0) then a closer fit of
the tails of the peak will be made.
FFT n - Calculates the Fast Fourier Transform of data set #n
(last data set if n is omitted). The data must be
equally spaced and the number of data points can not be
greater than 8192 and should be equal to 2 raised to an
integer power, i.e., 2, 4, 8, 16, 32, ... 8192; if not,
then the data is padded with the smaller of the two end
points. When the data is plotted it will be fit with a
truncated Fourier series by inverting the FFT; the KEEP
command will save the fit as a new data set.
FFTFREQ m - Specifies the number of FFT frequency components used
to fit the data.
OUTFFT file - Outputs the FFT coefficients (corresponding to positive
frequencies) to the specified file; if the file is omitted
then the output will be to the screen.
PLOTFFT max - Plots the magnitudes of the FFT coefficients; the
optional parameter specifies the maximum value on the
FFT axis.
PLOTFFT2 max - Plots square of magnitudes of FFT coefficients.
READFFT m - Reads m complex FFT coefficients corresponding to zero
frequency and m-1 positive frequencies; m-1 should equal
2 raised to an integer power. A new data set is
generated by inverting the FFT (the x coordinates will
be 0, 1, 2, ...).
The following command is used to plot error bars:
ERRBARS m n - Data set #m will plot as upper or lower error bars of
data set #n. To have upper and lower error bars for
data set #n there must be two sets of data specified
as error bars. One data set must contain lower limits
and the other must contain upper limits on the
corresponding y values of data set #n; the x values of
the error bar data sets are ignored.
The following commands select the type of 2-D plot for each data set:
LINE n - Selects a line plot (the default) of data set #n
inwhich successive data points are connected by
straight lines.
SPLINE n - Selects a natural cubic spline plot of data set #n
inwhich successive data points are connected by a
smooth curve.
CURVE n - Selects a smooth curve plot of data set #n using a
proprietary method that does not oscillate as much
as a spline curve.
SYMBOLS n - Specifies that symbols are to be drawn at the data points
of data set #n along with the connecting lines or curve.
SCATTER n - Selects a scatter plot of data set #n with just the
symbols for the data points and without the
connecting lines or curve.
SPIKES n - Specifies that vertical spikes are to be drawn to the
data points of data set #n along with the connecting
lines or curve.
HISTOGRAM n - Selects a histogram of data set #n with the data
points represented by vertical spikes and without the
connecting lines or curve.
HISTWIDTH value - If "value" is nonzero then histograms will be plotted
using bars of width "value" instead of spikes.
STEP n - Selects a step plot of data set #n with successive
data points connected by horizontal steps.
If "n" is omitted from any of the above commands then the command applies
to all data sets; "n-m" (with no spaces) specifies data sets n to m.
NOTE: In order to make a spline or curve plot the x values must be
in ascending order.
Multiple sets of plotted data that correspond to different orders of
magnitude or different ranges can be compared by using the z axis as a
second vertical axis on the right side of a 2-D plot (see USEZ command)
or by using the following commands:
SCALEX value n - Multiplies the x values in data set #n by "value".
OFFSETX value n - Adds "value" to the x values of data set #n.
SCALEY value n - Multiplies the y values in data set #n by "value".
OFFSETY value n - Adds "value" to the y values in data set #n.
SCALEZ value - Multiplies the z values by "value".
OFFSETZ value - Adds "value" to the z values.
If "n" is omitted from any of the above commands then it defaults to
all data sets; this feature can be used to scale the data to keep
scientific notation from being used in axes tic mark labels.
A new data set can be generated from a mathematical transformation of one
or more existing data sets by entering a function in the following format:
Y(Xn) = function of (Xn, Y1, Y2, ..., Yn, ..., Ym)
Example: Y(X1) = (Y2-Y1)^2 / SQRT( 1 + X1 )
The function Y(Xn) must be set equal to an expression that can contain
constants, the symbol PI, variables Xn, Y1, Y2, ..., Ym, the operators
"+" (addition), "-" (substraction), "*" (multiplication), "/" (division)
and "^" (exponentiation) and parentheses. The expression can also
contain the following elementary functions:
ABS(x) Absolute Value.
SQRT(x) Square Root.
EXP(x) Exponential (e to the power of x).
LOG(x) Logarithm (base e).
LOG10(x) Logarithm (base 10).
COS(x) Cosine.
SIN(x) Sine.
TAN(x) Tangent.
ACOS(x) Arccosine.
ASIN(x) Arcsine.
ATAN(x) Arctangent.
COSH(x) Hyperbolic Cosine.
SINH(x) Hyperbolic Sine.
TANH(x) Hyperbolic Tangent.
SINC(x) Sin(x) / x.
RND() Random Number (between 0 and 1).
U(x) Unit Step Function.
ERF(x) Error Function.
INVERF(x) Inverse Error Function.
J0(x) to J6(x) Bessel Functions of the First Kind.
The Y variables (Y1, Y2, ..., Ym) represent the Y values of m different data
sets. The Y values of all data sets that appear in the expression must
correspond to the same X values, represented by a single X variable (Xn).
The X variable specified as the function argument (Xn) is the only X variable
that can appear in the expression. The expression is evaluated at each of
the X values in data set #n. In the above example, the Y values of both
data set #1 and data set #2 (represented by the variables Y1 & Y2) must
correspond to the X values in data set #1 (represented by the variable X1);
this would be true, for example, if the data sets were read with the READTAB
command.
A function of a single independent variable can be graphed by entering
the function in the following format:
Y(X) = function of X
Example: Y(X) = 1 + 2 * EXP(-X^2) * SIN(PI*X)
The function Y(X) must be set equal to an expression inwhich X is the only
independent variable. A new data set will be generated by evaluating the
function at even intervals of X between starting and ending values specified
by the XSTART and XEND commands: XSTART ≤ X ≤ XEND. The number of sample
points (which defaults to 201) can be specified with the following command:
XSAMPLES n
Three dimensional data can be generated by entering a function of
two independent variables in the format:
Y(X,Z) = function of (X,Z)
Example: Y(X,Z) = SINC( SQRT( X*X + Z*Z ) )
The function will be evaluated at even intervals of Z between starting and
ending values specified by the ZSTART and ZEND commands: ZSTART ≤ Z ≤ ZEND.
The number of Z sample points (which defaults to 51) can be specified with
the following command:
ZSAMPLES n
If a function is sampled for the purpose of finding its FFT then the last
end point should not be included. The following command excludes the the
last end point, i.e., XSTART ≤ X < XEND and ZSTART ≤ Z < ZEND:
ENDPOINT OFF
Each of the three types of functions, Y(X), Y(X,Z), and Y(Xn), can be set
equal to expressions that contain intermediate variables T1, T2, ... T9.
Example: T1 = 1 + X
T2 = sin( 2 * X )
Y(X) = 1 + T2 / T1 + ( 1 - X * T2 ) / ( T1 * T1 )
The intermediate variables are not evaluated and are not checked for errors
until a function specification is used to generate a new data set; then, at
each point at which the function is to be evaluated, the intermediate
variables are first evaluated in the order T1, T2, ... T9 then the function
is evaluated. Note that if an intermediate variable is defined then it will
be evaluated even if it does not appear in the function's expression. An
intermediate variable can be cleared by setting it equal to nothing.
Example: T1 =
Some more commands for manipulating data sets are:
INTEGRATE n - Generates the indefinite integral of data set #n using
the trapezoidal method of numerical integration.
DIFFER n - Generates the derivative of data set #n.
YYTOXY n m - Generates a new data set with the x values copied from
the y values of data set #n and the new y values copied
from the y values of data set #m, i.e., (Yn,Ym) -> (X,Y).
If a table of data is input with the READTABY command and
plotting of the input data is disabled with the NOPLOT
command (described later) then the YYTOXY command can be
used to select any pair of columns from the table as a
data set to be plotted.
YTOZ n - Copies y values of data set #n to z data array.
COPY x1 x2 n - Copies points between x1 and x2 from data set #n to
a new data set; "COPY 0 0 n" copies all of the data set.
APPEND m n - Appends data set #m to end of data set #n and deletes
data set #m.
SWAPXY n - Swaps x and y values of data set #n.
REDUCE m n - Replaces data set #n with averages of successive groups
of m data points, i.e., the number of data points is
reduced by a factor of 1/m.
CLRDATA n - Clears data set #n. Clears all data sets if "n" is
omitted; n-m (no spaces) clears data sets n to m.
CLRPLOT - Resets all plot parameters to their default values.
Each set of data is plotted in a different color with EGA/VGA graphics;
dash lines are used with CGA and Hercules graphics.
COLOR m n - Specifies that color index "m" be used for drawing
axes and labels with EGA/VGA graphics; optionally,
the background's color index "n" can also be specified.
DATACOLOR m n - Specifies that color index "m" be used for plotting
data set #n (or n-k) with EGA/VGA graphics. "m" can
also be specified by using the first two letters of the
following color names: BLue, GReen, CYan, REd, MAgenta,
BRown, WHite, DGray, LBlue, LGreen, LCyan, LRed, LMagenta,
YEllow, BWhite (D=Dark, L=light, B=Bright). A simple way
of handling color is to put your choice of color commands
in a command file, COLOR.PLT for example, then put the
command "DO COLOR.PLT" in all other command files or type
it interactively. The DATACOLOR command with no parameters
sets the colors back to the default colors.
SYMTYPE m n - Specifies that symbol type "m" be used to plot data point
symbols for data set #n (or n-k). "m" can be one of the
following number or two-letter codes:
1 SQ Square
2 DI Diamond
3 CR Cross
4 CI Circle
5 AD Arrow Down
6 AR Arrow Right
7 AU Arrow Up
8 AL Arrow Left
9 HG Hour Glass
10 BO Bow
11 DO Dot
The SYMTYPE command with no parameters sets the symbol
types back to the default types.
DASH ON - Enables dashed lines (default for CGA & Hercules).
DASH OFF - Disables dashed lines (default for EGA/VGA).
The following commands are used to specify a title, axes labels and
data set legends:
XLABEL text - The character string "text" will be printed below
the x-axis.
YLABEL text - The character string "text" will be printed to the
left of the y-axis.
ZLABEL text - The character string "text" will be printed to the
right of the z-axis on 3-D plots (or 2-D plots
with a second vertical axis).
TITLE text - The character string "text" will be printed above
the plot.
LEGENDn x y text - The legend "text" associated with data set #n will
be printed at coordinate (x,y).
The LEGENDn coordinate (x,y) is the coordinate of the lower left corner
of the first character in the text. The coordinate values are specified
as fractions of axis length and are normally between 0. and 1., i.e.,
(0.,0.) is at the origin, (1.,0.) is at the end of the x-axis and (0.,1.)
is at the top of the y-axis. The legend coordinates are screen coordinates;
the legends are not repositioned if the origin or axes scales are changed.
LEGEND1, LEGEND2, ..., LEGEND9 are associated with data sets 1 to 9,
respectively, and LEGEND0 is associated with data set 10; only the first 10
data sets can be given legends. The legends are displayed using the same
colors used to plot the corresponding data sets with EGA/VGA graphics; if no
data set corresponds to a legend then the axes color is used. Legends are
displayed on 2-D plots only.
Rather than use the LEGENDn command, an easier way to display a
legend for data set #n is to manually place the legend on the plot.
After the plot is drawn:
(1) Press function key Fn.
(2) Move the cursor to the desired position on the screen.
(3) Type the text of the legend.
(4) Press the RETURN key.
The cursor appears after a function key has been pressed; it disappears
after the RETURN key has been pressed. The arrow keys will move the
cursor in pixel increments; the HOME and END keys will move the cursor
left and right in character increments and the PgUp and and PgDn keys will
move the cursor up and down in character increments. The cursor can also
be moved with a mouse. If the plot is saved with the SAVE command
(described later) then the legends entered on the screen will be saved as
LEGENDn commands. If just one function key is used to enter more than one
legend then only the last one entered is saved. Legends can be temporarily
disabled or cleared with the following commands:
LEGENDS OFF - Disables display of legends.
LEGENDS ON - Enables display of legends.
LEGENDS CLR - Clears all legends.
If the first character in a legend is an "*" then the asterisk will actually
be displayed as a data point symbol provided the corresponding data points
plot as symbols (specified by the SYMBOLS or SCATTER commands) and a specific
symbol type has been selected with the SYMTYPE command.
A 2-Dimensional plot will be made when the end of the command file is
reached or the following command is read:
PLOT - Makes a 2-Dimensional plot.
IMPORTANT NOTE: The plot will be cleared from the screen when the ESC key
(or right mouse button) is pressed.
NOTE: Pressing the RETURN key (or left mouse button) when the
plot is displayed will call up a pair of crosshairs. The
crosshairs can be moved with the arrow keys and the HOME,
END, PageUp and PageDown keys or with a mouse. Each
subsequent press of the RETURN key (or left mouse button)
will display the X and Y values associated with the point
at the center of the crosshairs. Press any other key to
clear the crosshairs. This feature works only with 2-D
plots with a single vertical axis.
USEZ n - Data set #n will be plotted using the z axis as a second
vertical axis on right side of a 2-D plot; n-m (no spaces)
makes data sets n to m plot on the second vertical axis.
The scale of the second vertical axis is set by ZSTART,
ZEND & ZSTEP and the axis label is set by ZLABEL. The
list of data sets that plot on the second vertical axis is
cleared with "USEZ".
NOPLOT n - Data set #n (or sets n-m) will not be plotted; it is not
deleted and can still be manipulated. The list of disabled
data sets is cleared with "NOPLOT".
A 3-Dimensional plot will be made when one of the following commands is
read:
PLOT3D - Makes a 3-Dimensional plot of multiple x-y data sets
with the z axis a parameter axis.
PLOT3D SURFACE - Makes a 3-Dimensional plot of multiple x-y data sets
representing curves on a surface y = f(x,z).
PLOT3D CURVE - Makes a plot of a 3-Dimensional curve.
PLOT3D SCATTER - Makes a 3-Dimensional scatter plot.
Each x-y data set will correspond to a point on the z axis. If z
values were read with the READZ command then the kth x-y data set will
correspond to the kth z value. The z values must be in ascending
order. If no z values were read then the x-y data sets will be plotted
at even intervals along the z axis. With a normal 3-D plot the data
sets are plotted in different colors. With a surface 3-D plot all
data sets are plotted with the same color using a different hidden line
algorithm that allows the bottom of the surface to be visible as well
as the top.
With a surface 3-D plot each data set is assumed to contain the points
of a curve on the surface that corresponds to a constant value of z,
i.e., Y = f(X,Zk) where Zk is the value of z that corresponds to the
kth data set containing the x and y values. If all data sets contain
the same sequence of x values (i.e., the data values are points on a
rectangular grid) then the easiest way of reading the points on the
surface is to use a READTAB command and a READZ command:
READTAB m n
X1 Y11 Y12 ... Y1m
X2 Y21 Y22 ... Y2m
. .
: :
Xn Yn1 Yn2 ... Ynm
READZ m
Z1 Z2 ... Zm
A 3-D curve is plotted as as sequence of (x,y,z) values inwhich the x-y
values were read as data set #1 using the READ command and the z values
were read using the READZ command. The (x,y,z) values can also be read
using the READXYZ command (or the READZXY command).
If a group of (x,y,z) values contained in data set #1 and z is plotted
as a 3-Dimensional scatter plot then a symbol is drawn at each data
point along with a vertical line connecting the symbol to the xz plane.
A different view of the a 3-D plot can be specified with the following
command:
ROTATE - Next 3-D plot will be rotated 90 degrees.
ROTATE OFF - Next 3-D plot will be displayed using the normal
view.
Equally spaced y data values can be plotted as a bar graph with the
following command:
BAR - Makes a bar graph of equally spaced y data values.
If multiple sets of data are to be plotted as a bar graph then all of
the data sets must have the same number of data points. A maximum of
25 data points can be plotted as a bar graph. If no character strings
were read with the READBARX command as the x value labels then the
x-axis is labeled using the values specified by the "XSTART" and
"XSTEP" commands; if the the XSTEP value is zero then the x-axis is
labeled as 1, 2, 3, ...
The following are some miscellaneous commands that are useful when entered
interactively at the keyboard:
HELP - Displays a summary of the plot commands.
SHOW - Displays the current status of plot parameters.
DO filename - Executes the plot commands in file "filename".
SAVE filename - Saves to the file "filename" the data and plot commands
that will redisplay the last displayed plot when the
"DO filename" command is given. If the filename is
omitted then it defaults to "SAVE.PLT". If the file
already exists it is overwritten.
DOS command - Executes the specified DOS command; a copy of
COMMAND.COM must be accessible by the system.
EDIT n - Invokes a user supplied editor to edit data set #n.
Before starting the SPLOT program, the name of the
editor must be specified with the DOS command "SET
SPEDIT=editor". For example, "SET SPEDIT=EDLIN"
specifies that the DOS EDLIN editor will be used; a
path to the editor must also be specified. The EDIT
command will write data set #n to the temporary file
SPLOTDAT.TMP in the default directory then invoke the
specified editor to edit the file. After the editor
terminates, the SPLOT program reads the data back in
from the file then deletes the file SPLOTDAT.TMP and
the file SPLOTDAT.BAK. The edited data set must not
contain more than 100 additional data points.
QUIT - Terminates the program.
The DOS memory resident program GRAPHICS will dump a plot to a dot
matrix printer when the Shift and PrtSc keys are simultaneously pressed;
the program must have been previously installed with the DOS command
"GRAPHICS". Some versions of the GRAPHICS program will only draw the
plot sideways and will not work with EGA, VGA or Hercules graphics. The
memory resident program PLOTDUMP (which comes with the SPLOT software)
draws the plot sideways or right side up and will work with CGA, EGA, VGA
or Hercules graphics. It can output the plot to an Epson or IBM proprinter
compatible dot matrix printer or an HP LaserJet compatible laser printer.
It is installed with the command "PLOTDUMP" and is invoked by simultaneously
pressing the Ctrl and PrtSc keys or with a software interrupt; see file
PLOTDUMP.DOC for more details. If plot dumps are made often then the
PLOTDUMP command should be placed in the PC's AUTOEXEC.BAT file (the file
PLOTDUMP.COM must be in the root directory or a path must be specified to
the directory containing the file).
AUTODUMP - Causes each plot to be dumped to a printer by automatically
calling PLOTDUMP after each plot.
DUMPINT n - Specifies PLOTDUMP interrupt number (60 to 65); command must
be given before AUTODUMP command if PLOTDUMP interrupt number
is other than 60.
PRINTFF - Outputs a formfeed to the printer each time the command is
given.
PLEASE NOTE: In order to dump a plot to a printer the PLOTDUMP program must
be installed in memory before making the plot.
EXAMPLES
Suppose the file EXAMPLE.PLT contains the following commands:
title Example Plot
xlabel This is the x axis
ylabel This is the y axis
xstart 5
xend 15
xstep 2.5
ygrid
open data2.dat
read 16
read
open data1.dat
read
close
read 12
6 178 7 193 7.5 212 8 243 8.5 365 9.5 185
10 72 12 43 12.5 150 13 240 13.5 30 14 85
symbols 3
symbols 4
plot
And suppose data file DATA2.DAT contains:
5 30 6 40 7 70 8 120
9 250 9.5 450 10 800 10.25 900
10.5 950 10.75 880 11 700 11.5 290
12 150 13 80 14 50 15 40
5 980 6 980 7 980 8 950 8.5 900 9 800
9.5 500 10 400 10.5 300 11 250 11.5 220 12 200
13 200 14 200 15 200
And suppose data file DATA1.DAT contains:
4 50 6 75 8 125 10 275 12 575 14 950
A plot will be displayed by typing "SPLOT EXAMPLE.PLT" at the DOS
prompt. The x and y axes will be labeled and the plot will be titled.
The x-axis will be linear by default and will range from 5 to 15 and
be labeled in increments of 2.5. By default the program SPLOT will
set the scale of the y-axis which will also be linear. Horizontal grid
lines will be drawn. Four sets of data will be plotted. The first set
of data will consist of 16 data points read from file data2.dat. The
second set of data will be all of the remaining data in file
data2.dat. The third set of data will be read from file data1.dat.
The fourth set of data will be the 12 data points in the command
file. All four sets of data will be plotted as line plots. Symbols
will be drawn at the data points in the third and fourth sets of data.
The data in the following command file will be plotted at even
intervals on the X-axis using a log Y-axis:
title Example Log Plot
xlabel X
ylabel Y
logy
ready 24
2.1 2.9 3.3 3.8 4.6 6.2 8.3 12.4 17.1 29.3 53.7 75.4
92.1 62.3 25.4 15.2 11.2 7.4 5.9 4.1 3.6 2.8 2.3 1.95
plot
The following commands will produce a 3rd degree polynomial curve fit:
title Third Degree Polynomial Curve Fit
xlabel X
ylabel Y
read 10
.5 3 1.5 7 2.5 12.5 5.5 14.5 6.5 16
9.5 14.5 10.5 16 12.5 16 14.5 21 15.5 23
poly 3
plot
Other examples can be found in the files with a PLT extension.
---------------------------------------------------------------------------
SPLOT SOFTWARE LICENSE AGREEMENT
The SPLOT software (programs SPLOT, HPLOT and PLOTDUMP and all
documentation and examples) is copyrighted by the author. If you find
the SPLOT software useful please send payment of $20.00 to the author:
William G. Hood
711 Mitchell
Conway, AR 72032 (USA)
The SPLOT software is protected by copyright law; it is not public
domain. You are granted a limited license to have possession of an
unpaid for copy of the SPLOT software for the purpose of evaluation of
the software and a license to make and freely give away unmodified
copies for the purpose of evaluation of the software by others. The
software may not be sold, separately or in conjunction with any other
software or hardware, without written permission of the author; a
reasonable (under $10) media and handling fee may be charged for
diskettes or other media containing the software or for access to the
software on bulletin boards.
Actual use of the SPLOT software, other than for reasonable evaluation
purposes, without payment of $20.00 to the author is a copyright
violation. Payment of $20.00 entitles a single user to use the SPLOT
software.
Those who have previously paid for the right to use a previous major
version of the SPLOT software can purchase the right to use the current
version for $10.00.
The software is provided "AS IS" without warranty of any kind, either
expressed or implied.
---------------------------------------------------------------------------
SPLOT VERSION NUMBER: 7.85
Send payment to: William G. Hood
711 Mitchell
Conway, AR 72032 (USA)
[ ] Payment by check of ________ for a license for ____ (1 to 4) users
to use the SPLOT software @ $20.00 / user ($10.00 / user if you have
already paid for version 5.x or 6.x; no additional charge if you have
already paid for version 7.x).
[ ] Payment by check of ________ for a license for ____ (5 to 9) users
to use the SPLOT software @ $15.00 / user.
[ ] Payment by check of ________ for a license for ____ (10 to 24) users
to use the SPLOT software @ $10.00 / user.
[ ] Payment by check of $250.00 for a license for an unlimited number
of users of the SPLOT software (within a single organization).
[ ] Payment by check of $30.00 for a single user license and a floppy
diskette containing the SPLOT software (version 7.85 or later).
Type of diskette drive: [ ] 360K 5.25"
[ ] 1.2M/360K 5.25"
[ ] 720K 3.5"
[ ] 1.44M/720K 3.5"
[ ] Payment by check of $450.00 for a floppy diskette containing the
source code (in C and assembler language) and a license to use
the source code with software written by the license holder.
Name: ________________________________________________________________
Company: ________________________________________________________________
Address: ________________________________________________________________
________________________________________________________________
________________________________________________________________
Phone: ___________________________
Comments and Suggestions: _______________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________